/**
******************************************************************************
* @File:
* @Author:	Ares
* @Revision:
* @Date:
* @Brief:
******************************************************************************
* @attention
*
******************************************************************************
*/
#include "fx.h"
#include "util.h"
#include "sys.h"
#include "conf.h"

//excute only once before device reset
void fx_dev_login(void)
{
	u8 cmd[256]={0};
	Aliyun_Obj *ali=&gSys.ali;
	
	sprintf((char *)cmd,"/ota/device/inform/%s/%s",ali->ProductKey,ali->DeviceName);
	if(gSys.sta.mqtt_conn==1)
	{
		mqtt_pub(cmd,FIRMWARE_VERSION);
		gSys.sta.dev_login=1;
	}
}